<extend name="Base/common" />
<block name="body">
	<include file="Public/other" />
	<div class="com-content">
		<script>
			function open_notice(id) {
				setCookie('touch_notice_close', 1);
				var url = 'new/info/' + id + '.html';
				window.location.href = url;
			}
			var touch_notice_close = getCookie('touch_notice_close');
			if (touch_notice_close == '1' && typeof(document.getElementById('js-com-notification2')) != 'undefined' && document.getElementById('js-com-notification2') != null) {
				document.getElementById('js-com-notification2').style.display = 'none';
			}
		</script>
		<script>var PX_HELP_DATA=['','uo74au74aqpc8801g3htt5l2v7',['touch','product','index'],'2014/04/09 09:40:40',0,false]; var DOMIN = {MAIN:"../m.paixie.com/",HELP:"../help.paixie.net/",TUAN:"../tuan.paixie.net/",WAP:"../wap.paixie.net/",UNION:"../union.paixie.net/",VIPSHOP:"../v.paixie.net/"};</script>  
		<div class="com-content-area" id="js-com-content-area">
			<!--content-->
			<div class="page-role good-page">
				<link type="text/css" rel="stylesheet" href="__CSS__/good/index.css" />
				<script type="text/javascript" src="__JS__/layer.js"></script>
				<script>
					$(function() {
						$('#js-freight-select').change(function() {
							var arr = $.trim($(this).val()).split('_');
							var freight_price = arr[0];
							freight_price += '元';
							$('#js-freight-val').text(freight_price);
							$(this).parent().children('span').html($(this).children('option[value="' + $(this).val() + '"]').html());
						});
						$('.colors p a').click(function() {
							$(this).addClass('selected').siblings().removeClass('selected');
						});
						//加入购物车
						$('.addtocart2').click(function() {
							var color_value = $('.colors p .selected').attr('color_value'),
								size = $('.sizes .selected').html()
								id = $('#id').val(),
								foot_width = $('#foot_width').val(),
								foot_long = $('#foot_long').val(),
								foot_thick = $('#foot_thick').val();
							if (color_value == null) {
								Model.alert('请选择颜色！');
								return false;
							}
							if(foot_width == 0 && foot_long == 0 && foot_thick == 0){
								if (size == null) {
									Model.alert('请选择尺寸！');
									return false;
								}
							}
							
							$.get("{:U('Cart/addCart')}", {
								goods_id: id,
								color_value: color_value,
								size: size,
								foot_width: foot_width,
								foot_long: foot_long,
								foot_thick: foot_thick
							}, function(r) {
								if (r.status) {
									//layer.msg('加入成功！', {time: 1000});
									$('#header-cart-num').html( parseInt( $('#header-cart-num').html() ) + 1 );
									Model.alert('加入成功！');
								} else {
									//layer.msg('加入失败！', {time: 1000});
									Model.alert('加入失败！');
								}
							}, 'json');
						});

						//尺码助手
						$('.size-btn').click(function(){
								$('.size-btn-input').slideToggle('slow');
						});

					});
				</script>
				<script src="__JS__/com/jquery.touchslider.min.js"></script>
				<script src="__JS__/good/index.js"></script>
				<script src="__JS__/com/com.js"></script>
				<script>
					jQuery(function($) {
						$(".touchslider").touchSlider({
							mouseTouch: true,
							autoplay: true
						});
					});
				</script>

				<div class="page-title">商品详情</div>
				<div class="pxui-tab" style="margin-bottom:10px;">
					<a href="{:U('goods_info', array('type' => 1, 'id' => $row['id']))}" >测量方法</a>
					<a href="{:U('goods_info', array('type' => 2, 'id' => $row['id']))}">品牌</a>
					<a href="{:U('goods_info', array('type' => 3, 'id' => $row['id']))}">包装清单</a>
					<a href="{:U('goods_info', array('type' => 4, 'id' => $row['id']))}">售后须知</a>
				</div>
				<div class="pxui-area">
					<h1>
			            {$row.name}
						<input type="hidden" name="id" id="id" value="{$row.id}" />
			        </h1>

					<div class="touchslider">
						<div class="touchslider-viewport" style="height:280px;overflow:hidden">
							<div>
								<volist name="photos" id="v">
									<div class="touchslider-item"><a><span class="img320"><dfn></dfn><img src="{$v}"/></span></a></div>
								</volist>
							</div>
						</div>

						<div class="touchslider-navtag">
							<a class="touchslider-prev"></a>
							<volist name="photos" id="v">
								<span class="touchslider-nav-item" style="margin-right: 5px;"></span>
							</volist>
							<a class="touchslider-next"></a>
						</div>
					</div>
					<a class="pxui-gray-button" href="{:U('goods_info', array('type' => 0, 'id' => $row['id']))}">点击查看图文详情&nbsp;&nbsp;<i class="arrow-right"></i></a>
					<ul class="goodinfo" id="js-goodinfo">
						<li>
							<b name="detail_mao" id="detail_mao">价&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;格:</b>
							<div>
								<p><strong class="pxui-color-red">￥{$row.price}</strong> <del class="pxui-color-gray">{$row.shop_price}</del></p>
							</div>
						</li>
						<li>
							<b>运&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;费:</b>
							<div>
								<p>
									<span>免运费</span>
								</p>
							</div>
						</li>
						<li>
							<b>服&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;务:</b>
							<div>
								<p>
									由科而士提供售后服务 </p>
							</div>
						</li>
						<li>
							<b>颜&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;色:</b>
							<div class="colors">
								<p>
									<volist name="colors" id="v">
										<a href="javascript::" title="{$v.name}" class="img40" color_value="{$v.name}" style="margin-right: 5px;">
											<img src="{$v.img}" truesrc="{$v.img}" title="{$v.name}" />
										</a>
									</volist>
								</p>
							</div>
						</li>
						<!--size-message-->
						<li>
							<b>尺&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码:</b>
							<div>
								<p class="sizes">
									<volist name="sizes" id="size">
										<a stock="{$size.num}" value="{$size.name}_{$size.id}" style="margin-right: 5px;">{$size.name}</a>
									</volist>
								</p>
							</div>
						</li>
						<li>
							<b>尺码助手:</b>
							<div>
								<a href="javascript:void(0);" class="size-btn">不知道尺码？</a>
							</div>
						</li>
						<li class="size-btn-input" style="display:none;">
							<div>脚长：<input type="text" name="foot_long" id="foot_long" value="0" autocomplete="off" /></div>
							<div>脚宽：<input type="text" name="foot_width" id="foot_width" value="0" autocomplete="off" /></div>
							<div>脚厚：<input type="text" name="foot_thick" id="foot_thick" value="0" autocomplete="off" /></div>
							<div><a href="{:U('goods_info', array('type' => 5, 'id' => $row['id']))}" class="size-btn">测量方法</a></div>
						</li>
						<!--size-message-end-->
					</ul>
					<!--<input type="button" class="pxui-light-button addtocart2" value="加入购物车" />-->
					<div class="cart-btn-wrap">
						<div class="cart-price">价&nbsp;&nbsp;&nbsp;&nbsp;格：<i class="price">￥{$row.price}</i></div>
						<input type="button" class="add-Cart addtocart2" value="加入购物车" />	
						<!-- <a class="goods-info" href="{:U('goods_info', array('type' => 0, 'id' => $row['id']))}">查看图文详情</a> -->
					</div>
					<h3 id="js-attrs-title">商品属性</h3>
					<ul class="attrs">
						<li>货号：{$info.gno}</li>
						<li>品牌：{$info.brand_name}</li>
						<li>款式：{$info.style}</li>
						<li>颜色：{$info.color}</li>
						<li>鞋面：{$info.xm_cz}</li>
						<li>里皮：{$info.jijie}</li>
						<li>鞋底：{$info.xd_cz}</li>
						<li>闭合方式：{$info.bihe}</li>
						<li>根底款式：{$info.sex}</li>
						<li class="red">鞋头款式：{$info.piancha}</li>
						<li>上架时间：{$info.sj_time}
							<input type="hidden" value="2" id="shoesClass" />
						</li>
						<li>上市年份：{$info.ss_year}</li>
						<li>&nbsp;</li>
						<li><a class="a" id="js-show-all-attrs">查看完整属性</a></li>
					</ul>

					<h3>服务承诺<a href="#">返回顶部<i class="arrow2-top"></i></a></h3>
					<ul class="services">
						<li><i></i> 正品保证 假一赔十</li>
						<li><i></i> 15天无理由退货</li>
					</ul>
				</div>
			</div>
			<!--content-end-->
		</div>
	<include file="Public/footer" />
	<include file="Public/alert" />
</block>